package com.adcc.eoss.efb.ngctrl.Service.Condition;

import org.springframework.context.annotation.Condition;
import org.springframework.context.annotation.ConditionContext;
import org.springframework.core.type.AnnotatedTypeMetadata;

import java.util.Properties;

public class LinuxCondition implements Condition {
    @Override
    public boolean matches(ConditionContext context, AnnotatedTypeMetadata metadata) {
        Properties props = System.getProperties();
        return props.getProperty("os.name").toLowerCase().indexOf("windows") < 0;
    }
}
